/**
 * @author raymondlo
 */
var AAActionManager = require("./AAActionManager").AAActionManager;

exports.AANode = GL2.Node.subclass({
/** @lends Animation.AANode.prototype */

    classname: 'AANode',
    
	/**
	 * @class A node that can run actions.
	 * 
	 * @constructs The default constructor.
	 * @augments Core.Class
	 */
    initialize: function(){
    },
	
	/**
	 * Runs an action
	 * 
	 * @example
	 * var node = new Animation.AANode();
	 * var move = new Animation.AAMoveTo(new Core.Point(250,400), 2.0);
	 * node.runAction(move);
	 *  
	 * @param {Core.Class} action Action to be executed.
	 * @see AAActionManager#addAction
	 */
	runAction: function(action) {
		AAActionManager.addAction(this, action);
	},
    
	/**
	 * Stops all actions
	 *  
	 * @see AAActionManager#removeAllActionsFromTarget
	 */
	stopAllActions: function() {
		AAActionManager.removeAllActionsFromTarget(this);
	},
	
	/**
	 * The default destructor. Calling this removes the node from its parent
	 */
    destroy: function($super){
        $super();
    },
    
});
